package com.jiawa.wiki.controller;

import com.jiawa.wiki.req.TestresultQueryReq;
import com.jiawa.wiki.resp.CommonResp;
import com.jiawa.wiki.resp.PageResp;
import com.jiawa.wiki.resp.TestresultQueryResp;
import com.jiawa.wiki.service.TestResultService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.validation.Valid;

@RestController
@RequestMapping("/testresult")
public class TestResultController {

    @Autowired
    private TestResultService testResultService;


    @GetMapping("/list")
    public CommonResp<PageResp<TestresultQueryResp>> list (@Valid TestresultQueryReq req){
        CommonResp<PageResp<TestresultQueryResp>> resp = new CommonResp<>();
        resp.setContent(testResultService.list(req));
        return resp;
    }



}
